package com.huixue.cn.ztej.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huixue.cn.ztej.bean.Examine;
import com.huixue.cn.ztej.bean.Project;
import com.huixue.cn.ztej.bean.Results;
import com.huixue.cn.ztej.dao.ExamineDao;
import com.huixue.cn.ztej.utils.SystemContents.API_RETURN_STATUS;

@Service
public class ExamineServiceImpl {
	@Autowired
	private ExamineDao examineDao;
	
	public Examine selectById(String id){
		return examineDao.selectById(id);
	}
	
	public List<Examine> selectList(Map<String, Object> map){
		return examineDao.selectList(map);
	}
	
	public Long selectCount(Map<String, Object> map){
		return examineDao.selectCount(map);
	}

	public void insert(Examine examine){
		examineDao.insert(examine); 
	}
	
	public Results add(Examine examine){
		Results results = null;
		examineDao.insert(examine); 
		results = new Results(API_RETURN_STATUS.NORMAL.value(), "审批成功！");
		return results; 
	} 
	
	public void updateById(Examine examine){
		examineDao.updateById(examine);
	}
	
	public void updateByIdSelective(Examine examine){
		examineDao.updateByIdSelective(examine);
	}
	
	public void deleteById(String id){
		examineDao.deleteById(id);
	}
	
	public List<Examine> selectByApplyId(int applyId,int type){
		return examineDao.selectByApplyId(applyId,type);
	}
}
